package com.gxa.common.exception;


import java.io.Serializable;

/**
 * Created by bill on 2020/12/8
 **/
public class BusinessException extends Exception implements Serializable {

    private MessageCode messageCode;

    public BusinessException(MessageCode messageCode){
        //给父类传递异常信息
        super(messageCode.getMessage());
        this.messageCode=messageCode;
    }

    public MessageCode getMessageCode() {
        return messageCode;
    }

    public void setMessageCode(MessageCode messageCode) {
        this.messageCode = messageCode;
    }
}
